package com.zy.algorithm.v2.bean;

import java.util.ArrayList;
import java.util.List;

public class BucketSimpleNode extends SimpleNode {

    int max;
    int min;

    int[] sortedS;



    public BucketSimpleNode(int max, int min) {
        this.max = max;
        this.min = min;
    }

    public int getMax() {
        return max;
    }

    public int getMin() {
        return min;
    }

    public int[] getSortedS() {
        return sortedS;
    }

    public void setSortedS(int[] sortedS) {
        this.sortedS = sortedS;
    }


    public void setSortedS(List<Integer>[] buckets) {
        List<Integer> list = new ArrayList<>();
        for (List<Integer> bucket : buckets) {
            list.addAll(bucket);
        }
        int[] ints = new int[list.size()];
        for (int i = 0; i < list.size(); i++) {
            ints[i] = list.get(i);
        }
        this.sortedS = ints;
    }
}
